package com.mo.admin.api.menu.controller;

import com.mo.admin.api.menu.service.MenuService;
import com.mo.admin.common.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("menu")
public class AuthMenuController {
    @Resource
    private MenuService menuService;

    /**
     * 获取当前用户对应角色的菜单树
     */
    @GetMapping("auth")
    public Result getAuthMenuVOList() {
        return menuService.getAuthMenuVOList();
    }

    /**
     * 获取所有菜单树
     */
    @GetMapping("list")
    public Result getMenuVOList() {
        return menuService.getMenuVOList();
    }
}
